/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.click.app.service.impl;

import com.click.app.dao.MeasureUnitDao;
import com.click.app.model.MeasureUnit;
import com.click.app.service.MeasureUnitManager;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author orgale
 */
public class MeasureUnitManagerImpl extends GenericManagerImpl<MeasureUnit, Long> implements MeasureUnitManager {

    MeasureUnitDao measureUnitDao;

    public MeasureUnitManagerImpl(MeasureUnitDao measureUnitDao) {
        super(measureUnitDao);
        this.measureUnitDao = measureUnitDao;
    }

    public List<MeasureUnit> findById(Long id) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public List getAllByName() {
        System.out.println("Entro al metodo!");
        List names = new ArrayList();
        for (int i = 0; i < this.getAll().size(); i++) {
            names.add(this.getAll().get(i).getName());
        }
        return names;
    }
}
